#ifndef __TYPES_H__
#define __TYPES_H__

#define IN
#define OUT
#define INOUT

typedef enum _BOOL_e_
{
    BOOL_FALSE = 0,
    BOOL_TRUE,
} BOOL;

#define VOID            void

#define UINT8           unsigned char
#define SINT8           char

#define UCHAR           unsigned char
#define CHAR            char

#define UINT16          unsigned short
#define USHORT          unsigned short
#define SINT16          short

#define UINT32          unsigned int
#define SINT32          int

#define UINT64          unsigned long long
#define SINT64          long long

#define ULONG           unsigned long
#define SLONG           long

#define FLOAT           float

#define DOUBLE          double  
#define DOUBLE_ESPILON  (1E-6)

#define UNUSED(x)       (void)x;

#define ARRAY_SIZE(x)   (sizeof(x) / sizeof(x[0]))

#define BIT_SET(x, y)    (x |= (0x01 << y))        //置位
#define BIT_CLR(x, y)    (x &= (~(0x01 << y)))     //复位（清零）
#define BIT_CHK(x, y)    (x & (0x01 << y))         //检位

#endif
